<template>
  <div style="margin-top: 50px">
    <el-form :model="value"
             :rules="rules"
             ref="contentForm"
             label-width="120px"
             class="form-inner-container"
             size="small">
      <el-form-item label="内容">
        <editor v-model="value.content" :min-height="192"/>
      </el-form-item>
      <el-form-item style="text-align: center">
        <el-button type="primary" size="medium" @click="handlePrev">上一步,填写商品分类基本信息</el-button>
        <el-button type="success" size="medium" @click="submit">提交</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import Editor from '@/components/Editor';
export default {
  name: "CatContentDetail",
  components:{
    Editor
  },
  props: {
    value: Object,
    isEdit: {
      type: Boolean,
      default: false
    }
  },
  data(){
    return {
      rules: {
        content: [
          {required: false, message: '请输入名称', trigger: 'blur'},
          {min: 2, max: 198, message: '长度在 2 到 198 个字符', trigger: 'blur'}
        ],
      }
    }
  },
  methods:{
    submit() {
      this.$emit("submit")
    },
    handlePrev(){
      this.$emit('prevStep')
    },
  }
}
</script>

<style scoped>

</style>
